package com.particles 
{
	/**
	 * ...
	 * @author SChabanov
	 */
	public class ParticleParams 
	{
		
		public var xVelosicty		:Number = NaN;
		public var yVelosicty		:Number = NaN;
		public var drag				:Number = NaN;
		public var rotation			:Number = NaN;
		public var angleSin			:Number = NaN;
		public var angleCos			:Number = NaN;
		public var angleIncrement	:Number = 1;
		public var gravity			:Number = NaN;
		public var fade				:Number = NaN;
		public var shrink			:Number = NaN;
		public var lifeTime			:int 	= 0;
		public var holdtime			:int 	= 0;
		public var scale			:Number = NaN;
		
		/**
		 * 
		 * 
		 * @param	xVel velocity by x
		 * @param	yVel velocity by y
		 * @param	friction velocity smoother
		 * @param	rot rotation
		 * @param	g gravity
		 * @param	life lifetime = frameCount
		 * @param	hold hold delay before start
		 * @param	fade to alpha
		 * @param	shrink change scaleX scaleY
		 * @param	scale start initial scale
		 * @param	angleSin y for movement
		 * @param	angleCos x for movement
		 * @param	angleIncrement for change angle parameter
		 * @return ParticleParams
		 */
		public static function create(xVel:Number = 1, 
									    yVel:Number = 1,
										friction:Number = 0.99, 
										rot:Number = 0, 
										g:Number = 0.9, 
										life:int = 60, 
										hold:int = 0,
										fade:Number = 0.1, 
										shrink:Number = 1, 
										scale:Number = 1,
										angleSin:Number = NaN,
										angleCos:Number = NaN,
										angleIncrement:Number = 1):ParticleParams {
											
										
			var p:ParticleParams = new ParticleParams();
			p.xVelosicty = xVel;
			p.yVelosicty = yVel;
			p.drag = friction;
			p.rotation = rot;
			p.fade = fade;
			p.shrink = shrink;
			
			p.gravity = g;
			p.lifeTime = life;
			p.holdtime = hold;
			p.scale = scale;
			p.angleSin = angleSin;
			p.angleCos = angleCos;
			p.angleIncrement = angleIncrement;
			return p;
		}
		
		
	}

}